package comm.jr.controller;

import comm.jr.entry.Airports;
import comm.jr.service.AirportsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController /*替换@RestController=@Controller + @ResponseBody*/
@RequestMapping("/air/")
public class AirportsController {
    @Autowired
   private AirportsService airportsService;
    @RequestMapping("getID")
    public Integer getID(Airports airports){
        return airportsService.getIdbyCityname(airports);
    }
}
